package co.laomag.coffee.api.user;

import co.laomag.coffee.model.entity.ChUser;
import co.laomag.coffee.model.vo.Message;
import co.laomag.coffee.model.vo.Pagination;
import com.rabbitmq.client.AMQP;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author 马泽朋
 * @version 1.0
 * @date 2020/4/19 下午 3:11
 */
@Api(tags = "用户操作API")
@RequestMapping("/user")
public interface UserApi {

    @ApiOperation("用户注册")
    @ApiImplicitParam(name = "chUser",value = "用户实体")
    @ApiResponses({
            @ApiResponse(code = 200,message = "添加成功"),
            @ApiResponse(code = 429,message = "添加失败")
    })
    @RequestMapping(value = "addUser",method = RequestMethod.POST)
    Message addUser(ChUser chUser);

    @ApiOperation("修改用户操作")
    @ApiImplicitParam(name = "chUser",value = "用户实体")
    @ApiResponses({
            @ApiResponse(code = 200,message = "操作成功"),
            @ApiResponse(code = 429,message = "操作失败")
    })
    @RequestMapping(value = "updateUser",method = RequestMethod.POST)
    Message updateUser(ChUser chUser);

    @ApiOperation("获取用户列表")
    @ApiImplicitParam(name = "pagination",value = "分页参数")
    @ApiResponses({
            @ApiResponse(code = 200,message = "查询成功")
    })
    @RequestMapping(value = "getUserList",method = RequestMethod.GET)
    Message getUserList(Pagination pagination);

}
